package com.margo.project.shiro.filter;

import org.apache.shiro.authz.AuthorizationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class MyExceptionHandler {
	
	Logger logger=LoggerFactory.getLogger(this.getClass());

    @ExceptionHandler
    public String ErrorHandler(AuthorizationException e) {
    	logger.error("没有通过权限验证！", e);
        return "my_error";
    }
}
